# Create your views here.
from risk.models import *
from risk.serializers import *
from dvadmin.utils.viewset import CustomModelViewSet


class EntityIso9000ViewSet(CustomModelViewSet):
    """
    list:查询
    create:新增
    update:修改
    retrieve:单例
    destroy:删除
    """
    queryset = EntityIso9000.objects.all()
    serializer_class = EntityIso9000Serializer
    create_serializer_class = EntityIso9000CreateUpdateSerializer
    update_serializer_class = EntityIso9000CreateUpdateSerializer
    filter_fields = ["企业名称", "统一社会信用代码",]
    search_fields = ["企业名称", "统一社会信用代码",]
